package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 优惠券限定影片表
 * </p>
 *
 * @author ywb
 * @since 2024-03-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("coupon_film_maps")
@ApiModel(value="CouponFilmMapsEntity对象", description="优惠券限定影片表")
public class CouponFilmMapEntity implements Serializable {
    @ApiModelProperty(value = "优惠券限定影片ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "影片 id")
    private Long filmId;

    @ApiModelProperty(value = "优惠券 id")
    private Long couponId;
    
    @ApiModelProperty(value = "影院 id")
    private Long cinemaId;

    @ApiModelProperty(value = "租户 id")
    private Long tenantId;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;
    
    public CouponFilmMapEntity() {
    }
    
    public CouponFilmMapEntity(Long filmId, Long couponId) {
        this.filmId = filmId;
        this.couponId = couponId;
    }
}
